 %include header libraryName=libraryName
    <script type="text/javascript">
        //<!--
        $(document).ready(function() {
            $('.title').focus();
        })
        //-->
    </script>
    <div>Add Resource</div>
    %if error and not noISBN:
    <div class="error">Unable to locate information for the ISBN you provided</div>
    %end
    
    <div class="bordered">
        <form method="post" action="/administration/addResource">
            <div>
                %if noISBN:
                <input name="isbn" type="hidden" value="NO ISBN" />
                %else:
                <label for="isbn">ISBN: <input name="isbn" type="text" value="{{data.get('isbn').encode('utf-8')}}" /></label>
                %end
                <label for="title">Title: <input class="title" name="title" type="text" value="{{data.get('title', '').encode('utf-8')}}" /></label>
                <label for="resource_type_id">
                    Resource Type:
                    <select name="resource_type_id">
                        %for type in resourceTypes:
                        <option value="{{type.get('id')}}">{{type.get('description').encode('utf-8')}}</option>
                        %end
                    </select>
                </label>
            </div>
            <div>
                <label for="author">Author: <input class="author" name="author" type="text" value="{{data.get('author', '').encode('utf-8')}}" /></label>
                <label for="publisher">Publisher: <input class="publisher" name="publisher" type="text" value="{{data.get('publisher', '').encode('utf-8')}}" /></label>
            </div>
            <div>
                <label for="summary">Summary: <textarea cols="40" rows="7" name="summary">{{data.get('summary', '').encode('utf-8')}}</textarea></label>
            </div>
            <div>
                <a href="/administration/manageResources" ><button>Cancel</button></a>
                <button type="submit">Save</button>
            </div>
        </form>
    </div>
%include footer